package lc.smart.android.util;

import lc.smart.android.main.SmartApplication;

/**
 * ��ַ����
 * */
public class UriUtil
{

	public static boolean isImg(String url)
	{
		if (SmartApplication.is_DubugMode)
		{
			System.out.println("isImg" + url);
		}

		boolean isImg = false;
		if (url.endsWith(".jpg") || url.endsWith(".bmp")
				|| url.endsWith(".gif") || url.endsWith(".psd")
				|| url.endsWith(".png") || url.endsWith(".pcx")
				|| url.endsWith(".DXF") || url.endsWith(".cdr")
				|| url.endsWith(".tiff") || url.endsWith(".tga")
				|| url.endsWith(".ufo") || url.endsWith(".eps")
				|| url.endsWith(".ai") || url.endsWith(".raw")
				|| url.endsWith(".exif") || url.endsWith(".fpx")
				|| url.endsWith(".svg"))
		{
			isImg = true;
		}

		return isImg;

	}

	public static boolean isFile(String url)
	{
		if (SmartApplication.is_DubugMode)
		{
			System.out.println("isImg" + url);
		}
		boolean isFile = false;
		if (url.endsWith(".txt") || url.endsWith(".java") || url.endsWith(".c")
				|| url.endsWith(".cpp") || url.endsWith(".py")
				|| url.endsWith(".xml") || url.endsWith(".json")
				|| url.endsWith(".log") || url.endsWith(".mp3")
				|| url.endsWith(".wav") || url.endsWith(".ogg")
				|| url.endsWith(".midi") || url.endsWith(".mp4")
				|| url.endsWith(".rmvb") || url.endsWith(".avi")
				|| url.endsWith(".flv") || url.endsWith(".chm")
				|| url.endsWith(".doc") || url.endsWith(".docx")
				|| url.endsWith(".xls") || url.endsWith(".xlsx")
				|| url.endsWith(".ppt") || url.endsWith(".pptx")
				|| url.endsWith(".apk") || url.endsWith(".rar")
				|| url.endsWith(".jar") || url.endsWith(".zip")
				|| url.endsWith(".gz") || url.endsWith(".img")
				|| url.contains("ac=forum_attachment"))
		{
			isFile = true;
		}

		return isFile;

	}
}
